﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Drawing;
using CoolCode.Entities;
using CoolCode.Services;
using CoolCode.Web;
using CoolCode.Linq;
using CoolCode.WebServices;

namespace CoolCode.Web.UI.Views.Inquiry
{
    public partial class PassProducts : NGProducts
    { 
        //protected void Page_Load(object sender, EventArgs e)
        //{ 
        //    if (!IsPostBack)
        //    {
        //    }
        //}

        private IQueryBuilder<Inspection> _queryBuilder;

        public override IQueryBuilder<Inspection> CreateFilter()
        {
            if (_queryBuilder == null)
            {
                List<ProductCriterion> criterions = this.CriterionService.List();
                _queryBuilder = productFilter.CreateFilter()
                     .Custom(QueryHelper.PassCondition(criterions));
            }
            return _queryBuilder;
 
        }

    }
}
